package net.mxox.app.financeweb.dao.hibernate;

import java.util.List;

import org.springframework.orm.hibernate3.support.HibernateDaoSupport;

import net.mxox.app.financeweb.dao.IAccountDao;
import net.mxox.app.financeweb.dto.Account;

public class AccountDao extends HibernateDaoSupport implements IAccountDao {

	/*
	 * (non-Javadoc)
	 * @see net.mxox.app.financeweb.dao.IAccountDao#createAccount(net.mxox.app.financeweb.dto.Account)
	 */
	public void createAccount(Account account) {
		getHibernateTemplate().save(account);
	}

	/* (non-Javadoc)
	 * @see net.mxox.app.financeweb.dao.IAccountDao#listAccount()
	 */
	@SuppressWarnings("unchecked")
	public List<Account> listAccount() {
		return getHibernateTemplate().find("from Account");
	}

}
